home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 10947 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1008 b 

  1. Path: news.ichange.com!newsmaster
  2. From: Jesse Liberty <jl@staff.ichange.com>
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: private base class vs. private member object
  5. Date: Mon, 11 Mar 1996 16:22:29 -0500
  6. Organization: AT&T
  7. Message-ID: <31449995.6A32@staff.ichange.com>
  8. References: <3141CB3E.5A36@staff.ichange.com> <4i19gc$85f@newsbf02.news.aol.com>
  9. NNTP-Posting-Host: 140.244.99.60
  10. Mime-Version: 1.0
  11. Content-Type: text/plain; charset=us-ascii
  12. Content-Transfer-Encoding: 7bit
  13. X-Mailer: Mozilla 2.0 (Win95; I)
  14. CC: jl@staff.ichange.com
  15.  
  16. JWPirie wrote:
  17. > Remember Booch's guidelines:  Inheritance (private or public) should be an
  18. > "is a" relationship.  Member objects should be a "part of" relationship.
  19.  
  20. I'm sorry but that is wrong.  Public inheritance constitutes an IS-A relationship, but private inheritance most certainly 
  21. DOES NOT. (sorry, didn't mean to shout).  Private inheritance establishes an "Implemeted in terms of" relationship and is 
  22. specifically used when you do NOT want an IS-A realtionship.
  23.